package com.shambles.manage.filter;

import com.shambles.manage.tools.XssHttpServletRequestWraper;

import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

/**
 * ��ֹxss����������
 * @author xiaowei
 *
 */
public class XssFilter implements Filter{

	@Override
	public void init(FilterConfig filterConfig) throws ServletException {
		
	}

	@Override
	public void doFilter(ServletRequest request, ServletResponse response,
			FilterChain chain) throws IOException, ServletException {
		  chain.doFilter(new XssHttpServletRequestWraper((HttpServletRequest) request), response);
	}

	@Override
	public void destroy() {
		
	}

}
